package com.rupertjones.globalcron.resources;

import org.brownflat.dbinit.upgrade.Upgrade;
import org.springframework.stereotype.Component;

/**
 * <p>&copy Rupert Jones 2012</p>
 *
 * @author rup
 */
@Component
public class Upgrade0019Settings implements Upgrade {
    @Override
    public int getSequence() {
        return 19;
    }

    @Override
    public String getSql() {
        return  "INSERT INTO setting (name, type, value_type, setting_value, description) VALUES ('Password Policy','PASSWORD_POLICY','java.lang.String','^(?=.*[A-Za-z])(?=.*\\d)(.{8,})$','Passwords must be at least 8 characters and contain at least one character and one number');";
    }

    @Override
    public String getName() {
        return "Add system settings";
    }
}
